<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org">
<head>
<title>首页</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
	<div class="container" id="content">
		<section class="content-header">
			<h1>
				<i class="fa fa-joomla"></i> <strong>模型权限配置</strong>
			</h1>
			<ol class="breadcrumb">
			    <li><a href="#"><i class="fa fa-home "></i>Home</a></li>
				<li>权限管理</li>
				<li class="active">模型权限配置</li> 
			</ol>
		</section>

		<section class="content">
			<div class="row">
				<div class="col-md-6">
					<div class="box box-info">
						<div class="box-header with-border">
							<h3 class="box-title">
								<i class="fa fa-cubes "></i><strong>模型树</strong>
							</h3>
							<div class="box-body" >
								<ul id="moduleTree" class="ztree"></ul>
							</div>
							<div class="modal-footer">
								<button type="button" class="btn btn-info  pull-right"
									onclick="history.go(-1)">返回</button>
								<button type="button"
									class="btn btn-info  pull-right setModuleBtn">授权</button>
							</div>
						</div>
					</div>
				</div>
				<div class="col-md-6">
					<div class="box box-info">
						<div class="box-header with-border">
							<i class="fa fa-th-list"></i>
							<h4 class="box-title">角色信息</h4>
						</div>
						<div class="box-body">
							<form id="roleForm">
								<div class="row-fluid">
									<div class="form-group">
									   <div class="col-sm-6">
									   	  <label class="control-label">角色名称</label> 
											<input name="id" id="id" type="hidden" class="form-control"
												th:value="${role.id}" /> 
										    <input name="name" type="text"
												readonly="readonly" class="form-control"
												th:value="${role.name}" />
									   </div>
										 <div class="col-sm-6">
										    <label class="control-label">角色描述</label> <input
											name="description" type="text" readonly="readonly"
											class="form-control" th:value="${role.description}" />
										 </div>
									</div>	
								</div>
							</form>
							</div>
							<div class="box-header with-border">
								<i class="fa fa-th-list"></i>
								<h4 class="box-title">已配置模块</h4>
							</div>
							<div class="box-body" >
								 <ul id="myModuleTree" class="ztree"></ul>
							</div>
					</div>
				</div>
			</div>
		</section>
		<div class="modal" id="operateSetModal">
			<div class="modal-dialog" role="dialog">
				<form id="accountEditForm">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
							<h4 class="modal-title"><strong>操作权限配置</strong></h4>
						</div>
						<div class="modal-body">
							<input type="hidden" name="modelId" id="modelId" />
							<div class="form-horizontal">
								<div class="form-group">
								   <label class="col-sm-2 control-label">操作权限</label>
								   <div class="col-sm-10">
								       <div class="col-sm-3">
								       <div class="checkbox">
										<label>
										  <input type="checkbox" id="readyOnly"/>查询
									    </label>
									   </div>   
									</div>
									<div class="col-sm-3">
									   <div class="checkbox">
										<label>
										    <input type="checkbox" id="modifyOnly"/>编辑
										</label>
									   </div>   
									</div>
									<div class="col-sm-3">
									    <div class="checkbox">
											<label>
											    <input type="checkbox" id="addOnly"/>创建
											</label>
										</div>   
									</div>
								   </div>
								</div>
								<div class="form-group">
								    <label class="col-sm-2 control-label">操作权限</label>
								    <div class="col-sm-10">
								       <div class="col-sm-3">
								       <div class="checkbox">
										<label>
										  <input type="checkbox" id="deleteOnly"/>删除
									    </label>
									   </div>   
									</div>
									<div class="col-sm-3">
									   <div class="checkbox">
										<label>
										    <input type="checkbox" id="other1Only"/>其他1
										</label>
									   </div>   
									</div>
									<div class="col-sm-3">
									    <div class="checkbox">
											<label>
											    <input type="checkbox" id="other2Only"/>其他2
											</label>
										</div>   
									</div>
								   </div>
							    </div>
								<div class="form-group">
								     <label class="col-sm-2 control-label">过滤条件</label> 
									  <div class="col-sm-3">
										  <div class="col-md-11">
											 <select  class="form-control" name="dataFilter" id="dataFilter">
							                     <option th:each="d:${dataFilters}"
													   th:text="${d.title}"></option>
						                      </select>
										    </div>
									   </div>
								</div>
							</div>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal">返回</button>
							<button type="button" class="btn btn-primary saveOperateBtn" >保存</button>
						</div>
					</div>
				</form>
			</div>
		</div>
		<script th:src="@{/m2r/m2rSet.js}"></script>
	</div>

</body>
</html>